from selenium.webdriver.common.by import By


class  UserAllNotificationLocator:
    # notification菜单
    notification_tab = (By.XPATH, "//div[contains(@data-menu-id,'MESSAGE_CST')]")
    #all notification菜单
    all_notification_tab = (By.CSS_SELECTOR, '[path="/work_bench/messageCenter/list"]')

    refresh_button = (By.XPATH,'//button[contains(@class,"antd4-btn-icon-only")]')

    #最新一条消息


    #消息总数
    total_count = (By.XPATH,'//li[contains(@class,"antd4-pagination-total-text")]')

    #页面tab
    all_notification = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[1]')
    announcement = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[2]')
    system = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[3]')
    product = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[4]')
    security = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[5]')
    promotion = (By.XPATH, '(//div[contains(@class,"antd4-tabs-tab-btn")])[6]')

    #右上角消息通知图标红点
    new_dot_in_icon = (By.XPATH,"//sup[contains(@class,'antd4-badge-dot')]")
    #右上角消息通知new标签
    new_tag_in_icon = (By.XPATH,"(//span[contains(@class,'antd4-tag')])[2]")
    #菜单新消息标签
    new_tag_in_menu = (By.XPATH, "(//span[contains(@class,'antd4-tag')])[1]")
    #列表新消息红点
    new_dot_in_list = (By.XPATH, "(//span[contains(@class,'antd4-badge-status-dot')])[1]")
    #右上角消息通知图标
    message_icon = (By.XPATH, "(//span[contains(@class,'header-right-icons')])[1]")

    # 页面第一条站内信的标题
    first_message_title_button = (By.XPATH,'//*[@class="antd4-table-tbody"]/tr[2]/td[2]/button')

    # 页面第一条站内信的标题的文案
    #first_message_title = (By.XPATH,'/html/body/div[1]/section/section/main/div/main/div/div/div/div[2]/div/div[2]/div/div[1]/div/div/div/div/div[1]/div/table/tbody/tr[2]/td[2]/button/div')
    first_message_title = (By.XPATH,'//*[@class="antd4-table-tbody"]/tr[2]/td[2]/button/div')


    # 页面第二条站内信的标题
    #second_message_title_button = (By.XPATH,'//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[3]/td[2]/button'
    second_message_title_button = (By.XPATH,'//*[@class="antd4-table-tbody"]/tr[3]/td[2]/button')


    #消息详情页弹框的标题
    #message_detail_title = (By.XPATH,'/html/body/div[4]/div/div[2]/div/div[2]/div[1]/div/div/div[1]')
    message_detail_title = (By.XPATH, '//div[contains(@class,"titleContentFirst")]')

    # 消息详情页关闭按扭
    close_message_detail = (By.XPATH, '//button[contains(@class,"antd4-modal-close")]')

    # 删除确认按钮
    delete_confirm_button = (By.XPATH, '//*[text()="OK"]/..')

    # 翻页按钮-下一个
    next_button = (By.XPATH, '(//button[contains(@class,"antd4-btn-circle")])[1]')

    # 翻页按钮-上一个
    previous_button = (By.XPATH, '(//button[contains(@class,"antd4-btn-circle")])[2]')

    #登录页面，发送验证码按钮
    send_code_button = (By.XPATH,'//*[@id="creForm"]/div[2]/div[2]/div/div/div/button')

    # 列表第一行
    #list_first_record = (By.XPATH, '//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[2]')
    list_first_record = (By.XPATH, '//*[@class="antd4-table-tbody"]/tr[2]')


    # mark as read按钮
    bottom_mark_as_read = (By.XPATH, '//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[2]/div/button[2]')

    # 列表选中按钮，第一个
    #list_select_first_button = (By.XPATH, '//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[2]/td[1]/label')
    list_select_first_button = (By.XPATH, '(//*[@type="checkbox"])[2]/..')


    # 列表已读按钮
    #list_mark_as_read = (By.XPATH, '//*[@id="rc-tabs-0-panel-All"]/div/div/div/div/div[1]/div/table/tbody/tr[2]/td[5]/div/div/div[2]/button')
    list_mark_as_read = (By.XPATH, '(//*[text()="Mark As Read"]/..)[2]')


    # 列表删除按钮
    list_delete_button = (By.XPATH, '(//button[contains(@class,"table-operation-btnLine-bt")])[1]')

    # 删除确认按钮
    delete_confirm_button = (By.XPATH, '//button[contains(@class,"antd4-btn-primary")]')